package com.zmn.uac.common.info.alipay;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.zmn.uac.common.info.AuthLoginCode;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 类描述：支付宝用户授权手机号信息
 *
 * @author xujie
 * @since 2021/06/10 14:27
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper = true)
@ApiModel("支付宝用户授权手机号信息")
public class AliPayUserAuthPhoneInfo extends AuthLoginCode implements Serializable {

    private static final long serialVersionUID = 1L;

    @NotNull(message = "报文不能为空")
    @ApiModelProperty(value = "报文（密文）", required = true)
    private String response;

    @NotNull(message = "签名不能为空")
    @ApiModelProperty(value = "对 response 报文的签名", required = true)
    private String sign;

    @JsonProperty("sign_type")
    @JSONField(name = "sign_type")
    @ApiModelProperty(value = "加签算法", notes = "应用维度配置的加签算法，小程序默认为 RSA2")
    private String signType;

    @JsonProperty("encrypt_type")
    @JSONField(name = "encrypt_type")
    @ApiModelProperty(value = "加密算法", notes = "默认为 AES")
    private String encryptType;

    @ApiModelProperty(value = "验签和解密用的字符集", notes = "默认为 UTF-8")
    private String charset;

    @ApiModelProperty(value = "deviceId设备信息", notes = "默认为 UTF-8")
    private String deviceId;
}
